package CollectionsDemo;

import com.sun.xml.internal.ws.policy.privateutil.PolicyUtils;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;

public class CollectionsDemo {
    public static void main(String[] args) {
        ArrayList<String> list = new ArrayList<String>();
        Collections.addAll(list, "abc", "ccc", "bbb", "您好", "bbb");
        System.out.println(list);
        for (Iterator<String> it = list.iterator();it.hasNext();) {
            System.out.println(it.next());
        }
    }
}
